// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010  Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

#ifndef FRONTEND_SERVICE_H
#define FRONTEND_SERVICE_H

// We're using the NeL Service framework and layer 5
#include <nel/net/service.h>


//typedef CHashMap< TDataSetIndex, std::string> TEntityNamesMap;

/**
 * CFrontEndService, based on IService5
 */
class CFrontEndService : public NLNET::IService
{
public:

	CFrontEndService():_preTime(0) {}

	/// Return the instance of the service
	static CFrontEndService *instance() { return (CFrontEndService*)IService::getInstance(); }

	// Initialisation
	void init();
	bool update();
	void release();

	/// Accept Clients
	//bool		AcceptClients;
	//std::string getInetIP()  { return _inetIP; }
	//uint32      getInetPort(){return _inetPort;}

	
private:
	uint32         _preTime;
	std::string	   _inetIP;
	uint32		   _inetPort;

	NLMISC::TTicks   _CurrTicks;
};

#define  FrontEndService  CFrontEndService::instance()

#endif
